*** Continuous skin color
eststo mlogit_1_cont: mlogit race_simple skin_color grades_score ///
if race < 4 , cluster(class_id) b(3)

eststo mlogit_2_cont: mlogit race_simple skin_color $ses grades_score ///
if race < 4 , cluster(class_id) b(3)

eststo mlogit_3_cont: mlogit race_simple skin_color $ses $ind_vars grades_score ///
if race < 4 , cluster(class_id) b(3)

eststo mlogit_4_cont: mlogit race_simple skin_color i.class_id $ses $ind_vars grades_score ///
if race < 4 , cluster(class_id) b(3)

esttab mlogit_1_cont mlogit_2_cont mlogit_3_cont mlogit_4_cont , keep(*grades_score*) ///
b(3) se(3) star(* 0.1 ** 0.05 *** 0.01) compress label nomtitle nogaps noomit ///
indicate("Skin Color Dummies = *skin_color" "SES = scores_poverty" ///
"Ind. Char. = $ind_vars" "Class FE = *class_id")

esttab mlogit_1_cont mlogit_2_cont mlogit_3_cont mlogit_4_cont ///
using tables\mlogit_cont.tex , replace booktabs keep(*grades_score*) ///
b(3) se(3) star(* 0.1 ** 0.05 *** 0.01) compress label nomtitle nogaps noomit ///
indicate("Skin Color Dummies = *skin_color" "SES = scores_poverty" ///
"Ind. Char. = $ind_vars" "Class FE = *class_id")


foreach j of numlist 1/4 {
	est res mlogit_`j'_cont 
	eststo mg_mlogit_`j'_1_cont: margins, predict(outcome(1)) dydx(grades_score) post 
	est res mlogit_`j'_cont 
	eststo mg_mlogit_`j'_2_cont: margins, predict(outcome(2)) dydx(grades_score) post
	est res mlogit_`j'_cont 
	eststo mg_mlogit_`j'_3_cont: margins, predict(outcome(3)) dydx(grades_score) post
}

esttab 	mg_mlogit_1_1_cont mg_mlogit_2_1_cont mg_mlogit_3_1_cont mg_mlogit_4_1_cont , ///
b(3) se(3) star(* 0.1 ** 0.05 *** 0.01) nogaps compress label nomtitle
esttab 	mg_mlogit_1_2_cont mg_mlogit_2_2_cont mg_mlogit_3_2_cont mg_mlogit_4_2_cont , ///
b(3) se(3) star(* 0.1 ** 0.05 *** 0.01) nogaps compress label nomtitle
esttab 	mg_mlogit_1_3_cont mg_mlogit_2_3_cont mg_mlogit_3_3_cont mg_mlogit_4_3_cont , ///
b(3) se(3) star(* 0.1 ** 0.05 *** 0.01) nogaps compress label nomtitle

esttab 	mg_mlogit_1_1_cont mg_mlogit_2_1_cont mg_mlogit_3_1_cont mg_mlogit_4_1_cont  ///
using tables\mg_mlogit_grades_1_cont , replace booktabs ///
b(3) se(3) star(* 0.1 ** 0.05 *** 0.01)  nogaps compress label nomtitle 

esttab 	mg_mlogit_1_2_cont mg_mlogit_2_2_cont mg_mlogit_3_2_cont mg_mlogit_4_2_cont ///
using tables\mg_mlogit_grades_2_cont , replace booktabs  ///
b(3) se(3) star(* 0.1 ** 0.05 *** 0.01)  nogaps compress label nomtitle 

esttab 	mg_mlogit_1_3_cont mg_mlogit_2_3_cont mg_mlogit_3_3_cont mg_mlogit_4_3_cont  ///
using tables\mg_mlogit_grades_3_cont , replace booktabs  ///
b(3) se(3) star(* 0.1 ** 0.05 *** 0.01)  nogaps compress label nomtitle 

		
